/**
 * Created by fanweihua on 2016/12/3.
 */
import React from 'react';
import PickerHtml from './pickerHtml.js';

const Picker = React.createClass({
    getInitialState: function () {
        return {
            html: PickerHtml.html,
            javaScriptHtml: PickerHtml.javaScriptHtml,
        };
    },
    render(){
        return (
            <div className="Z_slideIn">
                <div className="page slideIn">
                    <div className="Z_content_code">
                        <div dangerouslySetInnerHTML={{__html: this.state.html}}></div>
                        <div dangerouslySetInnerHTML={{__html: this.state.javaScriptHtml}}></div>
                    </div>
                </div>
                <div className="Z_content">
                    <div className="Z_panel-body-backgound">
                        <PickerNav></PickerNav>
                    </div>
                </div>
            </div>
        )
    }
});
module.exports = Picker;
const PickerNav = React.createClass({
    componentDidMount: function () {
        PickerHtml._go();
    },
    render(){
        return (
            <div className="Z_panel-body">
                <div className="page__hd">
                    <h1 className="page__title">Picker</h1>
                    <p className="page__desc">多列选择器，需要配合js实现</p>
                </div>
                <div className="page__bd page__bd_spacing">
                    <a href="javascript:;" className="weui-btn weui-btn_default" id="showPicker">单列选择器</a>
                    <a href="javascript:;" className="weui-btn weui-btn_default" id="showDatePicker">日期选择器</a>
                </div>
            </div>
        );
    }
});